package user_v1

import (
	"context"
	"gf-xb-api/internal/dao"
	"gf-xb-api/internal/model/entity"
)

func (s *sUser) GetUserLoginInfo(ctx context.Context, username string) (output *entity.SysUser, err error) {

	var user *entity.SysUser

	if err = dao.SysUser.Ctx(ctx).Where(dao.SysUser.Columns().Username, username).Scan(&user); err != nil {
		return nil, err
	}

	return user, nil
}
